package com.comparator.comparator2;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class EmployeeTest {

	public static void main(String[] args) {
		
		List<Employee> ls=new ArrayList<Employee>();
		ls.add(new Employee(1, "Avinash", "10/01/2012"));
		ls.add(new Employee(2, "Vikash", "10/03/2012"));
		ls.add(new Employee(3, "Shashi", "10/02/2012"));
		ls.add(new Employee(4, "Amit", "10/06/2012"));
		ls.add(new Employee(5, "Rakesh", "10/05/2012"));
		ls.add(new Employee(6, "Manoj", "10/08/2012"));
		ls.add(new Employee(7, "Alok", "10/09/2012"));
		ls.add(new Employee(8, "Indresh", "10/01/2011"));
		ls.add(new Employee(9, "Mahesh", "10/01/2014"));
		ls.add(new Employee(10, "Jyoti", "10/01/2013"));
		
		Collections.sort(ls,Employee.compName);
		for(Employee e:ls){
			System.out.println("EmpId : "+e.getEmpId()+"\t"+"  EmpName : "+e.getEmpName()+"\t"+"DaoeOfJoining : "+e.getJoiningDate());
		}

	}

}
